﻿namespace JBeamLibrary.VehicleParts
{
    public enum NodeMaterial
    {
        Unspecified = -1,
        Metal,
        Rubber,
        Glass,
        Plastic,
        Asphalt
    }

    public static class NodeMaterials
    {
        public const string NmMetal = "|NM_METAL";
        public const string NmRubber = "|NM_RUBBER";
        public const string NmGlass = "|NM_GLASS";
        public const string NmPlastic = "|NM_PLASTIC";
        public const string NmAsphalt = "|NM_ASPHALT";

        public static string GetStringValue(NodeMaterial mt)
        {
            switch (mt)
            {
                case NodeMaterial.Metal:
                    return NmMetal;
                case NodeMaterial.Rubber:
                    return NmRubber;
                case NodeMaterial.Glass:
                    return NmGlass;
                case NodeMaterial.Plastic:
                    return NmPlastic;
                case NodeMaterial.Asphalt:
                    return NmAsphalt;
            }
            return string.Empty;
        }

        public static NodeMaterial GetEnumValue(string material)
        {
            switch (material)
            {
                case NmMetal:
                    return NodeMaterial.Metal;
                case NmRubber:
                    return NodeMaterial.Rubber;
                case NmGlass:
                    return NodeMaterial.Metal;
                case NmPlastic:
                    return NodeMaterial.Rubber;
                case NmAsphalt:
                    return NodeMaterial.Asphalt;
                default:
                    return NodeMaterial.Unspecified;
            }
        }
    }


}
